<div class="container-fluid">
	<div id="pad-wrapper">
		<!-- products table-->
		<!-- the script for the toggle all checkboxes from header is located in js/theme.js -->
		<div class="table-wrapper products-table section">
			<div class="row-fluid head">
				<div class="span12">
					<h4>轮播列表</h4>
				</div>
			</div>
			
			<form action="/marquee/index" method="post" name="search">
			<div class="row-fluid filter-block">
				<div class="pull-left">
				<a class="btn-flat success new-product" href="/marquee/add">添加</a>
				</div>
				<div class="pull-right">
					分类：
                                        <select name="block_id">
						<option>全部</option>
						<?php foreach ($blocks as $block):?>
						<option value="<?php echo $block['block_id']?>" <?php if($block['block_id'] == $block_id):?> selected="selected" <?php endif;?>><?php echo $block['block_name']?></option>
						<?php endforeach;?>
					</select>
					<a class="btn-flat success" onclick="document.forms['search'].submit();">搜索</a>
				</div>
			</div>
			</form>
			
			<div class="row-fluid">
				<table class="table table-hover">
					<thead>
						<tr>
							<th class="span3">分类</th>
							<th class="span3">序号</th>
							<th class="span3"><span class="line"></span>图片</th>
							<th class="span3"><span class="line"></span>链接</th>
							<th class="span3"><span class="line"></span>操作</th>
						</tr>
					</thead>
					<tbody>
						<?php if($list):?>
						<?php foreach ($list as $item):?>
						<!-- row -->
						<tr class="first">
							<td><?php echo $item['description']?></td>
							<td><?php echo $item['sort']?></td>
							<td class="description"><img src="<?php echo STATIC_IMAGE . $item['image']?>" style="wdith:50px;max-height:200px;"/></td>
							<td>
							    <?php echo $item['link']?>
							</td>
							<td>
								<button type="button" class=" btn-flat primary" onclick="window.location.href='/marquee/edit?id=<?php echo $item['id']?>'">编辑</button>
								<button type="button" class=" btn-flat primary" onclick="window.location.href='/marquee/sort?block_id=<?php echo $item['block_id']?>'">排序</button>
                                                                <button type="button" class=" btn-flat primary" onclick="window.location.href='/marquee/delete?id=<?php echo $item['id']?>'">删除</button>
							</td>
						</tr>
						<?php endforeach;?>
						<?php endif;?>
					</tbody>
				</table>
			</div>
		</div>
		<!-- end products table -->
	</div>
	<div class="pagination pull-right">
	  <?php echo $pagination;?>
	</div>
</div>


